package com.parkwalk.xxx.component.tab;

import java.awt.Color;
import java.awt.GradientPaint;
import java.awt.Graphics;
import java.awt.Graphics2D;

import javax.swing.JPanel;

public class ToolBar extends JPanel {
	private static final long serialVersionUID = 5968884071399534707L;

	public ToolBar() {
		this.setBackground(Color.white);
	}

	public void paintComponent(Graphics g) {
		super.paintComponent(g);
		Graphics2D g2 = (Graphics2D) g;

		g2.setPaint(new GradientPaint(0, 0, Color.WHITE, 0, 40, new Color(224, 235, 247)));
		g.fillRect(0, 0, this.getWidth(), this.getHeight());

		g.setColor(new Color(186, 201, 219));
		g.drawLine(0, this.getHeight() - 1, this.getWidth() - 1, this.getHeight() - 1);
	}

	public void addButton(ToolbarButton button) {
		this.add(button);
	}
}
